/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmProjFiles extends BasicModel<PmProjFiles> {
  projectno?: string; // 项目编号
  fileType?: string; // 文件类型
  createByName?: string; // 创建人名称
  auditBy?: string; // 确认人编码
  auditByName?: string; // 确认人名称
  auditDate?: string; // 确认日期
}

export const pmProjFilesList = (params?: PmProjFiles | any) =>
  defHttp.get<PmProjFiles>({ url: adminPath + '/proj/folder/pmProjFiles/list', params });

export const pmProjFilesListData = (params?: PmProjFiles | any) =>
  defHttp.post<Page<PmProjFiles>>({ url: adminPath + '/proj/folder/pmProjFiles/listData', params });

export const pmProjFilesForm = (params?: PmProjFiles | any) =>
  defHttp.get<PmProjFiles>({ url: adminPath + '/proj/folder/pmProjFiles/form', params });

export const pmProjFilesSave = (params?: any, data?: PmProjFiles | any) =>
  defHttp.postJson<PmProjFiles>({ url: adminPath + '/proj/folder/pmProjFiles/save', params, data });

export const pmProjFilesDisable = (params?: PmProjFiles | any) =>
  defHttp.get<PmProjFiles>({ url: adminPath + '/proj/folder/pmProjFiles/disable', params });

export const pmProjFilesEnable = (params?: PmProjFiles | any) =>
  defHttp.get<PmProjFiles>({ url: adminPath + '/proj/folder/pmProjFiles/enable', params });

export const pmProjFilesDelete = (params?: PmProjFiles | any) =>
  defHttp.get<PmProjFiles>({ url: adminPath + '/proj/folder/pmProjFiles/delete', params });

export const listFilesByType = (params?: PmProjFiles | any) =>
  defHttp.post<Page<PmProjFiles>>({
    url: adminPath + '/proj/folder/pmProjFiles/listFilesByType',
    params,
  });

export const pmProjFilesUpload = (params?: PmProjFiles | any) =>
  defHttp.get<PmProjFiles>({
    url: adminPath + '/proj/folder/pmProjFiles/uploadFile',
    params,
  });
